The present invention relates to system-on-chip, and more specifically, to configuring determining memory width.
Determining the width of external memory is non-trivial. In order to correctly read from memory, the memory interface unit (MIU) has to be correctly configured. This is especially important for circuits that use external memory for configuration.
System-on-chip designs generally include a memory subsystem composed of one or more memory devices. The system designer generally decides, during the design phase, both the width and size of the memory subsystem to be included in the system.
The configurable system-on-chip generally uses an external non-volatile memory device to store configuration information. During the initialization of the configurable system on a chip, the system-on-chip loads its configuration from that external memory device.
In the prior art, programmable chips, such as the configurable-system-on-chip, central processing units (CPUs), and field programmable gate arrays (FPGAs) support external memory subsystems of a single width.
Existing programmable chips that support different memory subsystem widths allow the width to be specified in one of two ways: data loaded into the chip from a third subsystem or as constant inputs to the chip, by using one or more input pins tied high or low. Data may be loaded into the chip from a third subsystem, which may be a computer or similar system. Thus, when the system-on-chip is initialized, it must be connected to an independent third system, which may be used to initialize it. This is disadvantageous, because it makes the circuit non-self-configuring and requires the presence of an external system.
Using external input pins tied high or low is an alternative prior art option. However, this uses up external input pins. Because pin count is limited, using up external input pins is disadvantageous as well.
A method and apparatus for determining a width of an external memory is described. The method comprises reading a data from memory, and if the data matches an expected data key, determining the width of the memory.
Other objects, features, and advantages of the present invention will be apparent from the accompanying drawings and from the detailed description that follows below.